export default defineEventHandler(async (event) => {
  const body = await readBody(event);

  // 模拟保存属性数据
  const propertyData = {
    id: body.id || `data_${Date.now()}`,
    resourceId: body.resourceId,
    schemaId: body.schemaId,
    data: body.data || {},
    createTime: Date.now(),
    updateTime: Date.now(),
  };

  // 这里应该保存到数据库
  console.log('保存资源属性数据:', propertyData);

  return {
    code: 200,
    data: propertyData,
    message: '保存成功',
  };
});
